package com.groupscore.score.controller;

import com.groupscore.score.service.ChapterService;
import com.groupscore.score.service.ExcepitionCatService;
import entity.Result;
import entity.StatusCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import util.JwtUtil;


@RestController
@RequestMapping("/chapter")
public class ChapterController {

    @Autowired
    private ChapterService chapterService;

    @Autowired
    private JwtUtil jwtUtil;



    /**
     * 查询所有分类
     * @return
     */
    @CrossOrigin
    @GetMapping("/findAll")
    public Result findAll(){

        return  new Result(true, StatusCode.OK, "查询成功",chapterService.findAll());
    }

}
